home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / March 96 / Making PartMaker documents - a < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  5.6 KB  |  [TEXT/ttxt]

  1. Subject:     Making PartMaker documents - a Script
  2. Sent:        3/8/96 12:00 PM
  3. Received:    3/8/96 11:21 AM
  4. From:        Arni McKinley, motion@nbn.com
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. I recently had the occasion to create a new PartMaker document, so I
  9. chronicled the process. It appears below for those interested in creating
  10. one themselves.
  11.  
  12. Instructions for Building PartMaker Documents
  13.  
  14. * Obtain a copy of PartMaker 4.3 from either the old OpenDoc DR2 or 3
  15. release disk (I'm not sure which has it). PartMaker 4.4 won't do; it
  16. crashes for me when I use it.
  17.  
  18. * Duplicate the document PartMaker.cust, keeping the original intact for
  19. later use.
  20. * Drop it on ATGEdit which comes in a folder in the PartMaker 4.3 folder.
  21. PartMaker 4.4 doesn't have it.
  22. * When the document opens, select "wind" item 199 and choose "Retrieve
  23. 'WFMT' resources" from the Resources menu; Suddenly a bunch of other
  24. resources will appear in the window.
  25.  
  26. * Select 'cust' 'wind' item 128 and do a Cmd-T.
  27. * Edit the Class name to the one you want. It should match the name which
  28. is to be changed in every file in your project. So if your part is called
  29. "Stuff" and that name appears throughout the project files. then the class
  30. name is "Stuff". When a new part is made, this name will be replaced
  31. everywhere it appears in all of the project files.
  32. * Edit the Company Name. This should be the Company name which is used
  33. throughout the project. If the Company name is "CoolDudeInc", use that name
  34. here.  When a new part is made, this name will be replaced everywhere it
  35. appears in all of the project files.
  36. * Close the window, without saving or you'll crash later.
  37. * Zoom the window which is now up front and see lots of controls on the
  38. right side.
  39. * Cmd-Double click on the button to the right of the one named "Old Class
  40. Name:". Edit the name of the button to the Class name you used above.
  41. * Cmd-Double click on the button to the right of the one named "Old Company
  42. Name:". Edit the name of the button to the Company name you used above.
  43. * The prefix and suffix list will be used to find all of the files which
  44. are to have their filenames changed to include the new Class name. Prefix
  45. and suffix is just what they say. Comparison with your source file names
  46. will give you the idea of what to type in the boxes. If you need to create
  47. new boxes, hold down the shift key as you drag a rubber band around a pair
  48. of them (they must come in pairs). You'll need to hold the shift key down
  49. whenever you try to pick up one of these guys to move it. Shift clicking
  50. works here to select bunches of them at a time. Cmd-Double click opens a
  51. box (really a button) for renaming. Remember the som files too!!
  52.     If you drag without holding down the shift key, you'll make a new
  53. button, just delete it immediately, or shift click on it to select it, then
  54. delete it.
  55. * Once all the prefices and suffices are finished, close the windows
  56. without saving, back to the root item list window again.
  57.  
  58. * Select 'fea1' 'wind' item 128, and do a cmd-Y. You may now edit the text
  59. in the Instruction box.  Close the window, without saving (or you'll crash
  60. later).
  61. * Cmd-double click on the About button and edit the name of the button.
  62. Close the windows back to the root item list window, again without saving.
  63.  
  64. * Select 'ABTD' 'wind' item 1001 and do a cmd-Y. Edit the About text. Click
  65. "OK"; the window closes.
  66. * Close the next two windows back to the root item list without saving.
  67.  
  68. * Select all of the items except 'wind' 199, and choose "Separate 'WFMT'
  69. #128" from the Resource menu.
  70. * Close the window. Believe it or not, this saves everything you just did.
  71. * You can reopen the document as you did previously and go through it all
  72. again to check that it all saved properly.
  73.  
  74. To Create the PartMaker document itself
  75. * Place the project folder on your hard drive where you would put it if you
  76. were to do development with it, so all of the access poaths are set up
  77. correctly. I honestly don't know if that is necessary, but I heard tell it
  78. was.
  79. * Remove all of the binaries in the project. Also remove all of the
  80. * Select the PartMaker.cust document you just create and the folder.
  81. * Drag them onto PartMaker 43. (not 4.4, it will not create a good doument).
  82. * PartMaker will grind away and spit out a file with the ClassName preceded
  83. by a '*'. So if your Class Name was Stuff, the document will be called
  84. "*Stuff".
  85.  
  86. To create a new project from the document
  87. * Drop "*Stuff", or whatever it is onto PartMaker 4.3. It will present the
  88. dialog window you edited earlier complete with all of the instructional
  89. text and about information.
  90. * Change the ClassName and the Company Name.
  91. * It will grind away and create a project folder with the new ClassName,
  92. inside of which all the source, header and resource files will be rename
  93. with the ClassName properly. If not, then you missed a prefix or suffix and
  94. should add that to the editing list above. Remember the som files too!!
  95. * Put the project folder on your hard disk where you'll be doing
  96. development, so that the access paths are right. Open the new project and
  97. check that all of the filenames in the project are correctly changed. They
  98. may not be. Remove those with the old name and replace them with the
  99. correctly named soiurce files.
  100. * Open the def.h file and check that the CompanyName also changed correctly.
  101. * You should have a fully functioning project, duplicate to the one that
  102. you had, but with a new ClassName and new Company Name.
  103.  
  104. Have a fun party to celebrate your new tool.
  105.  
  106. Thank to Eric Soldan, Apple DTS, for ATGEdit, AppWannabe, and PartMaker
  107.  
  108. Arni McKinley
  109. Minds In Motion Software, Inc
  110. motion@nbn.com
  111. March 8, 1996
  112.  
  113.